<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .cover{
            height: 100%;
            width: 100%;
            position: absolute;
            background-color: #d8050c;
            display: none;
        }
    </style>
    <script src="jquery-3.4.1.js"></script>
    <script>
        $(function () {
            $('.get').click(function () {
                $.get('http://47.107.100.125:8080/api/home/getAgreement')
            })
            $('.post').click(function () {
                $.post('http://47.107.100.125:8080/api/home/getAgreement')
            })
            $('.ajax').click(function () {
                $.ajax({
                    url:'http://47.107.100.125:8080/api/home/getAgreement',
                    type:'get',
                    data:{language:'zh'},
                    success:function (data) {
                        console.log(data);
                    },
                    error:function () {
                        console.log('请求失败')
                    }
                })
            })
            $('.ajax_s').click(function () {
               $(document).ajaxStart(function () {
                   $('.cover').show(1000);
               })
                $(document).ajaxComplete(function () {
                    $('.cover').hide(1000);
                })
            })
        })
    </script>
</head>
<body>
        <input type="button" class="get" value="get请求">
        <input type="button" class="post" value="post请求">
        <input type="button" class="ajax" value="ajax请求">
        <input type="button" class="ajax_s" value="ajax使用补充">
        <div class="cover"></div>

</body>
</html>